package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import java.util.Date;
import java.util.HashMap;

//公告通知类
@Data
public class Notice {
    private Long id;
    //发布人id
    private Employee issuer;
    //发布时间
    private Date pubdate;
    //标题
    private String title;
    //内容
    private String content;
    //是否阅读过的公告
    private boolean read;

    public String getJson(){
        //封装自身的数据
        HashMap map = new HashMap();
        map.put("id",id);
        map.put("title",title);
        map.put("content",content);
        map.put("pubdate",pubdate);
        return JSON.toJSONString(map);
    }
}
